import subprocess

#更改音频格式，减小其大小

input_file = "D:/python_language/bert-vits-yun/myBert/output/1.wav"
output_file = "D:/python_language/bert-vits-yun/myBert/output/2.opus"
subprocess.run([
    "ffmpeg", "-i", input_file,
    "-c:a", "libopus", "-b:a", "16K", "-ar", "16000", "-ac", "1",
    output_file
])